A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism commonly used in industrial control systems, e.g. a Scanning Probe Microscope (SPM). A PID controller attempts to correct the error between a measured process variable and a desired setpoint by calculating and then outputting a corrective action that can adjust the process accordingly.
FIG. 1 shows a block diagram of a scanning probe microscope. The input to the PID controller is the error signal from the surface sensor, and the controller output is used to move an actuator, e.g. Z actuator, that ultimately controls the relationship between the probe and surface.
The input to the PID controller is the error signal and the output of the controller is the voltage or current used to drive the actuator. The responsiveness of the controller is set with the coefficients KP, KI, and KD as shown below:
                    u        =                                            K              P                        ⁢            e                    +                                                    K                I                                            T                I                                      ⁢                          ∫                              e                ⁢                                  ⅆ                  t                                                              +                                    K              D                        ⁢                          T              D                        ⁢                                          ⅆ                e                                            ⅆ                t                                                                        Eq        .                                  ⁢        1            TI represents the integration time and TD represents the differentiation time, e.g. the amount of time that the integral and the differentiation take place over. It is common, but certainly not necessary to set these to a common value, T. Alternately, their values can be included in the calculation of KI and KD, respectively.
The PID controller calculation involves three separate components; the Proportional component, the Integral component and Derivative component. The proportional component determines the reaction to the current error, the integral component determines the reaction based on the current and all previous errors and the derivative component determines the reaction based on the rate by which the error is changing. The weighted sum of the three components is output as a corrective action to a control element.
By adjusting constants in the PID controller algorithm, the PID can provide individualized control specific to process requirements including error responsiveness, overshoot of setpoint and system oscillation. 